package com.ztgf.sys.api.client;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ztgf.common.constant.Result;
import com.ztgf.common.enums.CodeEnum;
import com.ztgf.message.model.constant.MessageTopicType;
import com.ztgf.message.model.dto.ResponseDTO;
import com.ztgf.message.model.enums.MessageEnum;
import com.ztgf.message.model.service.IKafkaProducerService;
import com.ztgf.sys.models.bo.SysComplaintsBO;
import com.ztgf.sys.models.bo.SysComplaintsSaveBO;
import com.ztgf.sys.models.dto.SysComplaintsDTO;
import com.ztgf.sys.models.service.ISysComplaintsService;
import com.ztgf.sys.models.vo.SysComplaintsVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 投诉意见表控制器
 *
 * @author YUE
 * @Date 2020-05-27 11:24:51
 */

@RestController
@RequestMapping("/api/sysComplaints")
@Slf4j
@Api(value = "SysComplaintsApiController",tags = "投诉意见表Api接口")
public class SysComplaintsApiController {

    @DubboReference
    private ISysComplaintsService sysComplaintsService;

    @ApiOperation(value = "添加投诉意见表",notes = "添加投诉意见表")
    @PostMapping(value = "/insert")
    public Result insert(SysComplaintsSaveBO saveBO) {
        boolean b = sysComplaintsService.add(saveBO);
        if(b){
            return new Result();
        }
        return new Result<>(CodeEnum.FAIL_100001);
    }
}
